<template>
  <div>
    <NavBar :goUrl="toUrl"></NavBar>
    <div style="display: flex; flex-wrap: wrap">
    <!-- <div v-for="item in imgUrl" :key="item.id" style="flex: 1;"> 
      <img :src="item.previewUrl" width="120px">
    </div> -->
      <viewer :images="imgUrl" style="flex: 1;">
        <img v-for="item in imgUrl" :src="item.previewUrl" :key="item.id" width="125px" height="120px" />
      </viewer>
    </div>
  </div>
  
</template>
<script>
import NavBar from '@/components/h5header'
import API from '@/services/h5/my'
export default {
  name: 'LinkUrl',
  components: { NavBar },
  data() {
    return {
      imgUrl: undefined,
      id:'',
      toUrl:'',
      flag:false
    }
  },
  created() {},
  mounted() {
    let that = this
    // console.log("34行this.query",that.$route.query)
    that.id = that.$route.query.id
    that.toUrl = '/baodan/' + that.id
    this.init()
  },
  methods: {
    init() {
      let params = {
        contractId: this.$route.query.id
      }
      API.orderDetail(params).then(res => {
        if (res.data && res.data.code === 1000) {
          this.imgUrl = res.data.data.attachmentList
          // console.log('图片链接:',this.imgUrl)
        }
        
      })
    }
  }
}
</script>
<style scoped lang="less">
.header {
  padding: 7px 15px;
  box-sizing: border-box;
  background: #fff;
  .header-left {
    text-align: center;
    .header-left-list-item {
      background: #999;
      width: 19px;
      border: 1px solid #999;
      border-radius: 1.25px;
      margin: 0 auto;
      margin-bottom: 3px;
      &-text {
        font-size: 10px;
        color: #999;
        width: 30px;
      }
    }
    img {
      width: 20px;
      height: 26px;
      margin-right: 5px;
    }
  }
  .header-right {
    border-radius: 17px;
    width: 310px;
    flex: 1;
    .van-cell {
      background: #f5f5f5;
      padding-top: 0;
      padding-bottom: 0;
      align-items: center;
      border-radius: 17px;
      height: 32px;
    }
  }
}
.header-tab {
  box-sizing: rgba(0, 0, 0, 0.05) 0 0 7px 0;
}
.pro-list-item {
  margin: 0 15px;
  padding: 15px 0;
  border-bottom: 0.5px solid #f0f0f0;
}
.pro-list-item-left {
  position: relative;
  background: #fff9ee;
  box-shadow: rgba(0, 0, 0, 0.05) 0 0 8px 0;
  border-radius: 4px;
  width: 86px;
  height: 86px;
  box-sizing: border-box;
  &-bg {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 86px;
    height: 86px;
  }
  &-insurance {
    position: absolute;
    bottom: 0;
    width: 86px;
    height: 20px;
    line-height: 20px;
    // margin: 50px;
    background: #f68657;
    border-radius: 50% / 100% 100% 0 0;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
  }
}
.pro-list-item-right {
  flex: 1;
  margin-left: 15px;
  &-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    flex: 1;
  }
  &-title-text {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 16px;
    // line-height: 16px;
    // text-align: center;
    margin-left: 8px;
    border-radius: 4px;
    border: 0.5px solid @c-color-primary;
    background: #fde6dd;
    font-size: 12px;
    color: @c-color-primary;
    margin-top: 2px;
  }
  .active {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 16px;
    // line-height: 16px;
    // text-align: center;
    margin-left: 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #1a73e8;
    background-color: #94d8f6;
    border: 0.5px solid #1a73e8;
    margin-top: 2px;
  }
  &-desc {
    font-size: 13px;
    color: #999;
    margin-top: 5px;
  }
  &-protype {
    font-size: 12px;
    color: #bd893a;
    // margin-left: 5px;
    margin-top: 5px;
    div {
      display: inline-block;
      margin-right: 5px;
    }
  }
  &-money {
    font-size: 17px;
    font-weight: bold;
    color: #ec4001;
    margin-top: 2px;
  }
}
// 筛选弹框
.pop-select {
  height: 100vh;
  width: 300px;
}
.viewer-zoom-in {
  display: none;
}
</style>
<style>
.viewer-one-to-one {
  display: none;
}
.viewer-reset {
  display: none;
}
.viewer-play {
  display: none;
}
.viewer-flip-horizontal {
  display: none;
}
.viewer-flip-vertical {
  display: none;
}
.viewer-toolbar > ul > li {
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 5px;
}
.viewer-toolbar > ul > li::before {
  margin: 0.0893rem;
}
</style>
